import request from '@/utils/request'

// 查询客户优惠券列表
export function listMemberCoupon(query) {
  return request({
    url: '/marketingManagement/memberCoupon/list',
    method: 'get',
    params: query
  })
}

// 查询客户优惠券详细
export function getMemberCoupon(memberCouponId) {
  return request({
    url: '/marketingManagement/memberCoupon/' + memberCouponId,
    method: 'get'
  })
}

// 新增客户优惠券
export function addMemberCoupon(data) {
  return request({
    url: '/marketingManagement/memberCoupon',
    method: 'post',
    data: data
  })
}

// 修改客户优惠券
export function updateMemberCoupon(data) {
  return request({
    url: '/marketingManagement/memberCoupon',
    method: 'put',
    data: data
  })
}

// 删除客户优惠券
export function delMemberCoupon(memberCouponId) {
  return request({
    url: '/marketingManagement/memberCoupon/' + memberCouponId,
    method: 'delete'
  })
}

// 导出客户优惠券
export function exportMemberCoupon(query) {
  return request({
    url: '/marketingManagement/memberCoupon/export',
    method: 'get',
    params: query
  })
}